import request from '@/utils/request'

// 获取单个商品信息
export const getProductById = (productId) => {
  return request.get(`/products/${productId}`)
}

// 根据商品名称获取商品信息
export const getProductByName = (name) => {
  return request.get(`/products?name=${name}`)
}